##parameters=svn_uri, svn_username, svn_password

from Products.KnowledgeEngine.Accessories.SubversionAccessory.SubversionAccessory import subversion_model_list, getXMLExportFileTitle


files, tmp_path = subversion_model_list( context, svn_uri, svn_username, svn_password )

modelBrains = []
for file in files:
    identity, extension = file.split('.')    
    title = getXMLExportFileTitle( tmp_path + "/" + file )
    
    modelBrains.append( {'identity': identity, 'title': title} )
    #identities.append( identity )

return context.importXML_fromsvn_chooser( modelBrains=modelBrains, svn_uri=svn_uri, svn_username=svn_username, svn_password=svn_password )

